CFLAGS= -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection
CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions
FFLAGS= -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions -I/usr/lib64/gfortran/modules
FCFLAGS= -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions -I/usr/lib64/gfortran/modules
LDFLAGS= -Wl,-z,relro   -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld

###CFLAGS = -O2 -g -grecord-gcc-switches -pipe -fstack-protector-strong  -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
SELINUX_FLAGS='-Wall -W -Waggregate-return -Wcast-align -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wuninitialized -Wwrite-strings '
CC = gcc

target = libselinux_utils.so
target: selinux_utils.o
	$(CC) -shared -fPIC -o $(target) selinux_utils.o

selinux_utils.o: selinux_utils.c
	$(CC) -c -DHAVE_CONFIG_H -I.  -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -fpie  $(CFLAGS)   -o selinux_utils.o selinux_utils.c

clean:
	rm -f $(target) selinux_utils.o
